<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.1.0.js"></script>
<script type="text/javascript">

	$(function(){
		$("#contentList").click(function(){
			location.href="${initParam.root}collection/contentList.do"; 
		});
		
		$("#updateCollection").click(function(){ //게시글 수정 
			if(confirm("게시글을 수정하시겠습니까?")){
				location.href="${initParam.root}collection/auth_replyUpdate.do?no=${requestScope.bvo.no}";
			}//if
		});//게시글을 삭제하는 구현부
		$("#deleteCollection").click(function(){ //게시글 삭제
			if(confirm("게시글을 삭제하시겠습니까?")){
				location.href="${initParam.root}collection/auth_deleteCollection.do?no=${requestScope.bvo.no}";
			}//if
		});//updateBoard click
		
		
		$("#replyWrite").click(function(){
			location.href="${initParam.root}collection/auth_replyWrite.do?no=${requestScope.bvo.no}&ref=${requestScope.bvo.ref}";
		});
	});//ready
	
</script>

<table class="pub_detail_table" style="word-wrap: break-word; table-layout: fixed;">
	<thead>
		<tr id="thead">
			<td width="10%">${requestScope.bvo.no }</td>
			<td width="60%"><a href="${initParam.root}collection/contentList.do">자소서첨삭</a> | <b style="font-size: 11pt;">${requestScope.bvo.title}</b></td>
			<td align="right" width="30%">${requestScope.bvo.date}</td>
		</tr>
		<tr>
			<td colspan="2">작성자 | <b style="font-size: 10pt;">${requestScope.bvo.memberVO.id}</b></td>
			<td align="right">조회수 ${requestScope.bvo.hit} | 추천수 ${requestScope.bvo.like}</td>
		</tr>
	</thead>
	<tbody>
		<tr id="fileBar">
			<td colspan="3">
				<pre id="content">${requestScope.bvo.content}</pre>
			</td>
		</tr>
		<tr>
			<td colspan="2">
			</td>
			<c:choose>
			<c:when test="${sessionScope.loginMember.id==requestScope.bvo.memberVO.id}">
				<td align="right"><a href="#" id="updateCollection">수정</a> | <a href="#" id="deleteCollection">삭제</a></td>
			</c:when>
			<c:when test="${sessionScope.loginMember.point==-1}">
				<td align="right"><a href="#" id="deleteBoard">삭제</a></td>
			</c:when>
			<c:otherwise>
				<td></td>
			</c:otherwise>
			</c:choose>
		</tr>
	</tbody>
	<tfoot id="commentView">
	</tfoot>
</table>
<p align="right">
<input type="button" value="목록" id="contentList">
<input type="button" value="답글" id="replyWrite">
</p>

